//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.indexes.bookingsetlist.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;

public class SearchBookingData implements PickableBean {
    public static final String FN_SHOPNAME = "shopName";
    public static final String FN_DATES = "dates";
    public static final String FN_TIMES = "times";
    public static final String FN_SELECTEDPAGE = "selectedPage";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"shopName", "dates", "times", "selectedPage"});
    private String shopName;
    private String dates;
    private String times;
    private Long selectedPage;

    public SearchBookingData(String shopName, String dates, String times, Long selectedPage) {
        this.setShopName(shopName);
        this.setDates(dates);
        this.setTimes(times);
        this.setSelectedPage(selectedPage);
    }

    public SearchBookingData() {
    }

    public SearchBookingData duplicate() {
        SearchBookingData result = new SearchBookingData();
        result.shopName = this.shopName;
        result.dates = this.dates;
        result.times = this.times;
        result.selectedPage = this.selectedPage;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getShopName() {
        return this.shopName;
    }

    public void setShopName(String value) {
        this.shopName = value;
    }

    public SearchBookingData withShopName(String value) {
        this.setShopName(value);
        return this;
    }

    public SearchBookingData withShopName(String value, String defaultValue) {
        this.setShopName(value == null ? defaultValue : value);
        return this;
    }

    public String getDates() {
        return this.dates;
    }

    public void setDates(String value) {
        this.dates = value;
    }

    public SearchBookingData withDates(String value) {
        this.setDates(value);
        return this;
    }

    public SearchBookingData withDates(String value, String defaultValue) {
        this.setDates(value == null ? defaultValue : value);
        return this;
    }

    public String getTimes() {
        return this.times;
    }

    public void setTimes(String value) {
        this.times = value;
    }

    public SearchBookingData withTimes(String value) {
        this.setTimes(value);
        return this;
    }

    public SearchBookingData withTimes(String value, String defaultValue) {
        this.setTimes(value == null ? defaultValue : value);
        return this;
    }

    public Long getSelectedPage() {
        return this.selectedPage;
    }

    public void setSelectedPage(Long value) {
        this.selectedPage = value;
    }

    public SearchBookingData withSelectedPage(Long value) {
        this.setSelectedPage(value);
        return this;
    }

    public SearchBookingData withSelectedPage(Long value, Long defaultValue) {
        this.setSelectedPage(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -1754594358:
                if (name.equals("selectedPage")) {
                    var3 = 3;
                }
                break;
            case -345481567:
                if (name.equals("shopName")) {
                    var3 = 0;
                }
                break;
            case 95356549:
                if (name.equals("dates")) {
                    var3 = 1;
                }
                break;
            case 110364486:
                if (name.equals("times")) {
                    var3 = 2;
                }
        }

        switch(var3) {
            case 0:
                return this.getShopName();
            case 1:
                return this.getDates();
            case 2:
                return this.getTimes();
            case 3:
                return this.getSelectedPage();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -1754594358:
                if (name.equals("selectedPage")) {
                    var4 = 3;
                }
                break;
            case -345481567:
                if (name.equals("shopName")) {
                    var4 = 0;
                }
                break;
            case 95356549:
                if (name.equals("dates")) {
                    var4 = 1;
                }
                break;
            case 110364486:
                if (name.equals("times")) {
                    var4 = 2;
                }
        }

        switch(var4) {
            case 0:
                this.setShopName((String)value);
                return;
            case 1:
                this.setDates((String)value);
                return;
            case 2:
                this.setTimes((String)value);
                return;
            case 3:
                this.setSelectedPage((Long)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof SearchBookingData) ? false : this.signature().equals(((SearchBookingData)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean SearchBookingData has no signature defined, no hash code or equals possible.");
    }
}
